<?php 
$servername="127.0.0.1";
$username="root";
$password="";
$dbname="kouzhao";// 表名
$conn = new mysqli($servername,$username,$password,$dbname);
@mysqli_set_charset($conn,utf8);
if($conn ->connect_error){
	die("连接失败:". $conn ->connect_error);
} else {
	echo "连接成功";
}
?>